<?php
header('content-type:text/html; charset=utf-8');
session_start();
@$zhuoid=$_REQUEST['zhuoid'];
@$shu=$_REQUEST['shuliang'];
@$jia=$_REQUEST['zongjia'];
@$shi=$_REQUEST['shijian'];
$pdo=new PDO('mysql:dbname=can;charset=utf8','root');

$s=$pdo->prepare('insert into ding values(null,:shuliang,:zongjia,:shijian,:shijian,:zhuoid)');
if($s->execute(array('shuliang'=>$shu,'zongjia'=>$jia,'shijian'=>$shi,'zhuoid'=>$zhuoid))){
	header('content-type:text/html; charset=utf-8');
	header("Refresh:0;url=/dinglie.php");
	echo "OK";
}else {
	echo "error";
}